package com.xinyue.game.center.gameserver;

import com.xinyue.game.center.business.role.PlayerService;
import com.xinyue.game.center.common.AbstractGameCenterServerController;
import com.xinyue.game.center.common.GameCenterConfig;
import com.xinyue.game.center.common.model.ZoneConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author 王广帅
 * @Date 2021/5/28 22:54
 */
@RestController
@RequestMapping("gameserver")
public class GameServerController extends AbstractGameCenterServerController {

    @Autowired
    private PlayerService playerService;

    @Autowired
    private GameCenterConfig gameCenterConfig;

    @PostMapping("getZonerList")
    public Object getGameZoneList() {
        // Collection<GameServerInfo> gameServerInfoList = gameDataConfigService.getAllDataConfigList(GameServerInfo.class);
        // return responseSuccess(gameServerInfoList);
        List<ZoneConfig> zoneConfigList = gameCenterConfig.getZoneConfigList();
        return responseSuccess(zoneConfigList);
    }

}
